package org.tgcloud.group.repository;

import org.apache.ibatis.annotations.Param;
import org.tgcloud.group.entity.SysRole;
import org.tgcloud.group.web.controller.dto.sys.SysRoleDTO;

import java.util.Date;
import java.util.List;

/**
 * @Author: zhy
 * @Created: 2025-09-09-下午3:12
 * @Description: ${description}
 */
public interface SysRoleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SysRole record);

    int insertSelective(SysRole record);

    SysRole selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysRole record);

    int updateByPrimaryKey(SysRole record);

    List<SysRoleDTO> selectListByKeyword(@Param("keyword") String keyword,
                                         @Param("start") Date start,
                                         @Param("end") Date end,
                                         @Param("sort") Short sort);

    SysRole selectMsgByRoleName(@Param("roleName") String roleName);

    SysRole selectMsgByNameAndId(@Param("name") String roleName, @Param("id") Integer roleId);

    int updateName(@Param("roleId") Integer roleId, @Param("roleName") String roleName, @Param("viewAll") Short viewAll,
                   @Param("customName") String customName, @Param("multipleType") Short multipleType);

    int updateStatusByIds(@Param("ids") String[] split);

    int updateStatusById(@Param("id") Integer id, @Param("status") short status);

    List<SysRole> selectEditUserRoleList();

    List<String> selectRoleNameByRoleId(@Param("roleIds") String[] roleIds);

    List<SysRole> selectCustomList();

}